<?php session_start(); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>

	<meta charset="utf-8">

    <title>Vendor Page</title>

<?php echo link_tag(base_url().'skin.css'); ?>

<script src="<?php echo my_url(); ?>js/trhighlight.js" type="text/javascript"></script>

<script type="text/javascript" src="<?php echo base_url(); ?>js/1.js"></script>

<script type="text/javascript" src="../js/1.js"></script>

<script src="<?php echo base_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>

<script language="javascript" type="text/javascript">

 var BaseURL='<?php echo base_url(); ?>';





function confirmDelete(profile_id){

	

	var x= window.confirm("Are you sure to delete this item?");

	if(x){

		window.location.href = BaseURL + "vendor/delete_vendor/" + profile_id;

	}	

}



</script>



<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />

<link rel="stylesheet" href="style.css" type="text/css" media="screen" />

<link href="skin.css" rel="stylesheet" type="text/css" />

</head>



<?php

//echo $_SESSION['administrator_log']."============";

if(!isset($_SESSION['administrator_log']))

{

		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";

}

else

{

?>

<body >



	<div class="BodyCover">

	

 		<div class="ParentContent">

	        <?php require("at_menu.php"); ?>

			<div class="MenuTab">

    			<div class="MenuBelow"><img src="<?php echo base_url();?>images/below-menu.gif"></div>        

             </div>



			<br /><br />	

			<div class="module-index1">

		  		<div align="right"><a href="<?php echo base_url()?>admin/logout" style="color:#FF0000;">logout</a></div><br/>

  	                <p class=""><?php if (isset($recordflag)) {echo $recordflag;}?><p>

			   <h1>Vendor List:</h1>

                

		 <a href="<?php echo base_url() . "vendor/add_vendor/" ?>" >

         	<img src=" <?php echo base_url() ."images/icons/action_add.gif" ?>" style='border:none'/> Add New Data

         </a><br /> <br /><br />

                <div style='overflow:scroll;width:940px;height:400px;border:1pt solid #000;'>

                <table class='Grid' width='940px' border='1'>

                  <tr>

                        <th >View</th>

                        <th >Edit</th>

                        <th >Delete</th>                        

	 				    <th width='40'>Profile Type</th>

                        <th width='40'>Priority Code</th>

                        <th width='80'>Company Name</th>

                        <th width='40'>Nick Name</th>

                        <th colspan='2' >Full Name</th>

						<th width='40'>Mobile Number</th>

						<th width='40'>Home Number</th>						

                        <th width='40'>Office Number</th>

						<th width='60'>Email</th>

						<th width='40'>Trailer Number</th>

						<th width='40'>Truck Number</th>

                        <th width='40'>MC Number</th>

                        <th width='100' >Comment</th>

                  </tr>

<?php

        		  $_rowClass = 'tr_odd';

                foreach($list_vendors as $row)

                {

                         $profile_type = $row->profile_type;

						 $priority_code = $row->priority_code;

                         $company_name = $row->company_name;

                         $n_name = $row->n_name;

						 $f_name = $row->f_name;

						 $l_name = $row->l_name;

						 $cell_phone_num = $row->cell_phone_num;

						 $home_phone_num = $row->home_phone_num;

						 $office_phone_num = $row->office_phone_num;

						 $email_add = $row->email_add;

						 $trailer_num = $row->trailer_num;

						 $truck_num = $row->truck_num;

					 	 $mc_num = $row->mc_num;

						 $comment_box = $row->comment_box;

?>					

					<tr class="<?php echo $_rowClass ?>"  <?php echo GetTrEffects() ?> >

                        <td width='5'>

                                <a href="<?php echo  base_url() . "vendor_loads/view_vendor_loads/". $row->profile_id?>" >

                                <img src="<?php echo base_url() . "images/icons/view.gif" ?>" style='border:none'/></a>

						</td>

                        <td width='5'>

                        	<a href="<?php echo base_url() . "vendor/edit_vendor/" . $row->profile_id ?>">

                            	<img src="<?php echo base_url() . "images/icons/edit.gif" ?>" style='border:none' />

                             </a>

						</td>

                        <td width='5'>

                            	<a href="javascript:void(0)" onclick="confirmDelete(<?php echo $row->profile_id ?>);" >

								<img src="<?php echo base_url() . "images/icons/delete.gif" ?>" style='border:none' />

							</a>

						</td>

						<td><?php echo $profile_type ?></td>

                        <td><?php echo $priority_code?></td>

                        <td><?php echo $company_name?></td>

                        <td><?php echo $n_name?></td>

                        <td colspan='2'> <?php echo $f_name.",&nbsp".$l_name?></td>

                        <td><?php echo $cell_phone_num?></td>

                        <td><?php echo $home_phone_num?></td>						

                        <td><?php echo $office_phone_num?></td>

						<td><?php echo $email_add?></td>

						<td><?php echo $trailer_num?></td>

 						<td><?php echo $truck_num?></td>

						<td><?php echo $mc_num?></td>

						<td nowrap="nowrap" ><?php echo $comment_box?></td>

                  </tr>

<?php                  

				  if($_rowClass=="tr_odd") $_rowClass="tr_even"; else $_rowClass="tr_odd";     

                 }

?>

                 </table></div> 

       

    		<br>



            <div class="BodyContent">

            </div>	

			    		

		    <div class="Footer1">	

                <div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>

                 <a href="http://webmartis.com"> <img src="http://localhost/wodocontacts/images/wmlink.png"></a>

                 

                </div>                

            </div> <!---end of Footer1 ---->        

            

		</div><!---end of ParentContent ---->

    </div> <!---end of BodyCover ---->

 

</body>

<?php } ?>

</html>



